package auction.model;

import java.util.*;

public class ItemOneToManyJoin{
	private Long id;
	private String title;
	
	private UserOneToManyJoin buyer;
	
	public void setBuyer(UserOneToManyJoin b){
		this.buyer=b;
	}
	
	public UserOneToManyJoin getBuyer(){
		return buyer;
	}
	
	private Set<Bid> bids=new HashSet<Bid>();
	
	public ItemOneToManyJoin(){
	}
	
	public ItemOneToManyJoin(String t){
		title=t;
	}
	
	public Long getId(){
		return id;
	}
	public void setId(Long i){
		id=i;
	}
	
	public void setBids(Set<Bid> i){
		bids=i;
	}
	public Set<Bid> getBids(){
		return bids;
	}
	/* GOOD!!! */
	public void addBid(Bid bid){
		//System.out.println("GOOD!!!");
		//bid.setItem(this);
		bids.add(bid);
	}
	
	public void setTitle(String i){
		title=i;
	}
	public String getTitle(){
		return title;
	}
}